<?php
// Copyright 2012 @Wondershare
// $Id: test.php 1 2012-10-26����10:14:59Z Administrator $


$product_id=trim("${产品ID}");
$str='';
$sql="select count(*) as total from `license` where `license_id`=11 and `website_display`=1 and `license_delete`=0 and `product_id`=".$product_id;
$total = $db->getOne($sql);


$sqlb="select `product_is_year_charge` from product where `product_delete`=0 and `product_id`=".$product_id;
$product_year = $db->getOne($sqlb);
$price_start = $del_price_start =  "" ;
$price_one = array();
if($total)
{

	$price_one = get_price_license( $product_id, 11);
	$product_price = explode(',',$price_one['curr']);
	$product_price_other = explode('.',$price_one['EUR']);


	if( $product_year ){
		$price_start = 'R$ '.intval($product_price[0]).','.$product_price[1].'/ano';
		$price_start_other = intval($product_price_other[0]).','.$product_price_other[1].' €/ano';
	}else{
		$price_start = 'R$ '.intval($product_price[0]).','.$product_price[1];
		$price_start_other = intval($product_price_other[0]).','.$product_price_other[1] .' €';
	}
}

$price_tr = str_replace(',', '.', $price_start) ;
$price_tr = str_replace('R$ ', '', $price_tr) ;
$new_price = $price_tr / 6.00 ;
$new_price = substr($new_price, 0 , strpos($new_price, '.') + 3 );
$new_price = str_replace('.', ',', $new_price) ;